/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Principal.java
 *
 * Created on 01/05/2010, 19:49:38
 */
package loja.gui;

import javax.swing.JFrame;

/**
 *
 * @author Rodrigo
 */
public class Principal extends javax.swing.JFrame {

    /** Creates new form Principal */
    public Principal() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        MenuPrincipal = new javax.swing.JMenuBar();
        MenuArquivo = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        MenuCadastro = new javax.swing.JMenu();
        jMCliente = new javax.swing.JMenuItem();
        jMMarca = new javax.swing.JMenuItem();
        jMCategoria = new javax.swing.JMenuItem();
        jMProduto = new javax.swing.JMenuItem();
        MenuVenda = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Home Loja Digital ");
        setExtendedState(JFrame.MAXIMIZED_BOTH);
        setMaximizedBounds(new java.awt.Rectangle(0, 0, 2147483647, 2147483647));
        setModalExclusionType(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE);
        setName("Home"); // NOI18N

        MenuPrincipal.setName("MenuPrincipal"); // NOI18N

        MenuArquivo.setText("Arquivo");
        MenuArquivo.setName("MenuArquivo"); // NOI18N

        jMenuItem1.setText("Sair");
        jMenuItem1.setName("jMenuItem1"); // NOI18N
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        MenuArquivo.add(jMenuItem1);

        MenuPrincipal.add(MenuArquivo);

        MenuCadastro.setText("Cadastro");
        MenuCadastro.setName("MenuCadastro"); // NOI18N

        jMCliente.setAction(jMCliente.getAction());
        jMCliente.setText("Cliente");
        jMCliente.setName("jMCliente"); // NOI18N
        jMCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMClienteActionPerformed(evt);
            }
        });
        MenuCadastro.add(jMCliente);

        jMMarca.setText("Marca");
        jMMarca.setName("jMMarca"); // NOI18N
        jMMarca.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMMarcaActionPerformed(evt);
            }
        });
        MenuCadastro.add(jMMarca);

        jMCategoria.setText("Categoria ");
        jMCategoria.setName("jMCategoria"); // NOI18N
        jMCategoria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMCategoriaActionPerformed(evt);
            }
        });
        MenuCadastro.add(jMCategoria);

        jMProduto.setText("Produto");
        jMProduto.setName("jMProduto"); // NOI18N
        jMProduto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMProdutoActionPerformed(evt);
            }
        });
        MenuCadastro.add(jMProduto);

        MenuPrincipal.add(MenuCadastro);

        MenuVenda.setText("Venda");
        MenuVenda.setName("MenuVenda"); // NOI18N

        jMenuItem2.setText("Venda ");
        jMenuItem2.setName("jMenuItem2"); // NOI18N
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        MenuVenda.add(jMenuItem2);

        MenuPrincipal.add(MenuVenda);

        setJMenuBar(MenuPrincipal);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1050, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 567, Short.MAX_VALUE)
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-1058)/2, (screenSize.height-615)/2, 1058, 615);
    }// </editor-fold>//GEN-END:initComponents

    private void jMClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMClienteActionPerformed
        (new ClienteForm()).setVisible(true);
    }//GEN-LAST:event_jMClienteActionPerformed

    private void jMMarcaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMMarcaActionPerformed
        (new MarcaForm()).setVisible(true);
    }//GEN-LAST:event_jMMarcaActionPerformed

    private void jMCategoriaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMCategoriaActionPerformed
        (new CategoriaForm()).setVisible(true);
    }//GEN-LAST:event_jMCategoriaActionPerformed

    private void jMProdutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMProdutoActionPerformed
        (new ProdutoForm()).setVisible(true);
    }//GEN-LAST:event_jMProdutoActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        System.exit(0);
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        (new VendaForm()).setVisible(true);
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Principal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu MenuArquivo;
    private javax.swing.JMenu MenuCadastro;
    private javax.swing.JMenuBar MenuPrincipal;
    private javax.swing.JMenu MenuVenda;
    private javax.swing.JMenuItem jMCategoria;
    private javax.swing.JMenuItem jMCliente;
    private javax.swing.JMenuItem jMMarca;
    private javax.swing.JMenuItem jMProduto;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    // End of variables declaration//GEN-END:variables
}
